import java.awt.*;

public class Point {
	private int x;
	private int y;
	
	public Point(int initialX, int initialY) {
	    x = initialX;
	    y = initialY;
	}
	public void draw(Graphics p) {
		p.fillOval(x, y, 3, 3);
		p.drawString("(" + x + ", " + y + ")", x, y);
	}
	public int getX() {
		return x;
	}
	public int getY() {
		return y;
	}
	public void setLocation(int x, int y) {
		this.x = x;
		this.y = y;
	}
	public void translate(int dx, int dy) {
		this.x = x + dx;
		this.y = y + dy;
	}
	public double slope(Point b) {
		return ((b.y-this.y)/(b.x-this.x));
		
	}
	public boolean isVertical(Point q) {
		return (this.x == q.x);
	}
	public void setColor(Graphics p, Color aColor) {
		p.setColor(aColor);
	}
	public int distance(Point m) {
		double rise = m.y - this.y;
		double run = m.x - this.x;
		return (int) Math.sqrt((rise * rise) + (run * run));
	}
}